home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IO CD February 1999
/
IO_LUTY_99.ISO
/
DODATKI
/
Brood War
/
GREETBOT.ZIP
/
GREETBOT.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1998-03-31
|
988b
|
41 lines
//
// GREETBOT.CPP
//
// A simple Battle.net greeter bot. He does nothing but sit in his home
// channel and greet people as they come in.
//
// by Scott Coleman 3/31/98
//
//
#include "pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Virtual Event Handlers
*
******/
//=============================================================================
int GreetBot::OnChannel(char *szSpeaker, u_long uFlags, char *szEventText) {
BnBot::OnChannel(szSpeaker, uFlags, szEventText);
// we've just joined a new channel - greet everyone
Send("Hi, all!\r\n");
return 1;
}
//============================================================================
int GreetBot::OnJoin(char *szSpeaker, u_long uFlags, char *szEventText) {
BnBot::OnJoin(szSpeaker, uFlags, szEventText);
// a user has joined the channel - send a friendly greeting
Send("Hi, %s!\r\n", szSpeaker);
return 1;
}